package com.beauty.dressing.rxandroid.api;


import com.beauty.dressing.common.bean.AddressBean;
import com.beauty.dressing.common.bean.AddressManagerBean;
import com.beauty.dressing.common.bean.BaseParse;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface AddressApi {

    @FormUrlEncoded
    @POST("allAddress")
    Observable<BaseParse<Object, AddressManagerBean>> allAddress(@FieldMap Map<String, String> map);//收货地址列表

    @FormUrlEncoded
    @POST("defaultAddress")
    Observable<BaseParse<Object, Object>> defaultAddress(@FieldMap Map<String, String> map);//默认收货地址

    @FormUrlEncoded
    @POST("areas")
    Observable<BaseParse<Object, AddressBean>> areas(@FieldMap Map<String, String> map);//城市数据

    @FormUrlEncoded
    @POST("createAddress")
    Observable<BaseParse<Object, Object>> createAddress(@FieldMap Map<String, String> map);//新建地址

    @FormUrlEncoded
    @POST("updateAddress")
    Observable<BaseParse<Object, Object>> updateAddress(@FieldMap Map<String, String> map);//修改地址


}
